package com.syezon.wifikey.wifi.dialog;

import android.app.Dialog;
import android.content.Context;
import android.support.annotation.NonNull;
import android.view.Gravity;
import android.view.View;
import android.view.WindowManager;

import com.syezon.wifikey.R;


public class ConnectingDialog extends Dialog {

    public ConnectingDialog(@NonNull Context context) {
        this(context, 0);
    }

    public ConnectingDialog(@NonNull Context context, int themeResId) {
        super(context, themeResId);
        setContentView(View.inflate(context, R.layout.dialog_connecting, null));
    }

    @Override
    public void show() {
        getWindow().setGravity(Gravity.CENTER);
        getWindow().setLayout(WindowManager.LayoutParams.WRAP_CONTENT, WindowManager.LayoutParams.WRAP_CONTENT);
        super.show();
    }
}
